#pragma once

#include <atlctrls.h>

class CAppConfigDiag : public CDialogImpl<CAppConfigDiag>
{
public:
	enum { IDD = IDD_APP_CONFIG };

	BEGIN_MSG_MAP(CAppConfigDiag)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_DESTROY, OnDestroy)

		COMMAND_ID_HANDLER(IDOK, OnOK)
		COMMAND_ID_HANDLER(IDCANCEL, OnCancel)

	END_MSG_MAP()

public:
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

public:
	CAppConfigDiag();
	~CAppConfigDiag();

	void AddOptionsToTree();

public:
	CTreeViewCtrlEx m_treeOptions;
	CImageList m_imglstTree;
};
